package com.xiaohu.service;

import com.xiaohu.dao.UserDao;
import com.xiaohu.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service//为spring注入bean
public class UserService {

    @Autowired//spring自动为其创建对象
    private UserDao userDao;

    /**
     * 查询全部人员
     * @return 所有人员
     */
    public List<User> selectAll(){

        return this.userDao.selectAll();
    }

}
